# This is a config file for Fraunhofer parallel file system metadata nodes.
# http://www.fhgfs.com


# --- [Table of Contents] ---
#
# 1) Settings
# 2) Command Line Arguments
# 3) Settings Documentation


#
# --- Section 1: [Settings] --- 
#

logLevel                  = 3
logNoDate                 = false
logStdFile                = /var/log/fhgfs-meta.log
logNumLines               = 50000
logNumRotatedFiles        = 5

connPortShift             = 0
connMgmtdPortUDP          = 8008
connMgmtdPortTCP          = 8008
connMetaPortUDP           = 8005
connMetaPortTCP           = 8005
connUseSDP                = false
connUseRDMA               = true
connBacklogTCP            = 128
connMaxInternodeNum       = 32
connInterfacesFile        = <%= @interfaces_file %>
connNetFilterFile         = <%= @net_filter_file %>
connNonPrimaryExpiration  = 10000

storeMetaDirectory        = <%= @meta_directory %>
storeAllowFirstRunInit    = <%= @allow_first_run_init %>
storeUseExtendedAttribs   = true

tuneNumWorkers            = <%= @num_workers %>
tuneTargetChooser         = randomized

sysMgmtdHost              = <%= @mgmtd_host %>

runDaemonized             = true


#
# --- Section 2: [Command Line Arguments] ---
#

# Use the command line argument "cfgFile=/etc/anotherconfig.conf" to
# specify a different config file for fhgfs-meta.
# All other options in this file can also be used as command line
# arguments, overriding the corresponding config file values.


#
# --- Section 3.1: [Logging] ---
#

# [logLevel]
# Defines the amount of output messages. The higher this level, the more
# detailed the log messages will be.
# Note: Levels above 3 might decrease performance.
# Default: 3 (Max: 5)

# [logNoDate]
# Defines whether "date & time" (=false) or the current "time only" (=true)
# should be logged.
# Default: false 

# [logStdFile]
# The path and filename of the log file for standard log messages. If no name
# is specified, the messages will be written to the console.
# Default: /var/log/fhgfs-meta.log

# [logNumLines]
# The maximum number of lines per log file.
# Default: 50000

# [logNumRotatedFiles]
# The number of old files to keep when "logNumLines" is reached and the log file
# is rewritten (log rotation).
# Default: 5


#
# --- Section 3.2: [Connections & Communication] ---
#

# [connPortShift]
# Shifts all following UDP and TCP ports according to the specified value.
# Intended to make port configuration easier in case you do not want to
# configure each port individually.  
# Default: 0

# [connMgmtdPortUDP], [connMgmtdPortTCP]
# The UDP and TCP ports of the management node.
# Default: 8008

# [connMetaPortUDP], [connMetaPortTCP]
# The UDP and TCP ports of the metadata node.
# Default: 8005

# [connUseSDP]
# Enables the Sockets Direct Protocol (SDP) for RDMA-ready interconnects.
# SDP performance is somewhere between TCP over IB and native RDMA, so there
# is no need to enable SDP when you have native RDMA enabled.
# Default: false

# [connUseRDMA]
# Enables the use of Remote Direct Memory Access (RDMA) for Infiniband.
# For this setting to be effective, OFED ibverbs support has to be enabled at
# compile time of the fhgfs-opentk library.
# Default: true

# [connBacklogTCP]
# The TCP listen backlog.
# Default: 64

# [connMaxInternodeNum]
# The maximum number of simultaneous connections to the same node.
# Default: 10

# [connInterfacesFile]
# The path to a text file that specifies the names of the interfaces, which
# may be used for communication by other nodes. One interface per line. The
# line number also defines the priority of an interface.
# Example: "ib0" in the first line, "eth0" in the second line.
# Values: This setting is optional. If unspecified, all available interfaces
#    will be published and priorities will be assigned automatically.
# Note: This has no influence on outgoing connections. The information is sent
#    to other hosts to inform them about possible communication paths.
# Default: <none>

# [connNetFilterFile]
# The path to a text file that specifies allowed IP subnets, which may be used
# for outgoing communication. One subnet per line in classless notation (IP
# address and number of significant bits).
# Example: "192.168.10.0/24" in the first line, "192.168.20.0/24" in the second
#    line.
# Values: This setting is optional. If unspecified, all addresses are allowed for
#    outgoing communication.
# Default: <none>

# [connNonPrimaryExpiration]
# The number of requests after which a connection over a non-primary network
# inferface expires. When a non-primary connection expires, the system will try
# to establish a connection over the primary interface (falling back to another
# interface again if necessary).
# Values: Set to 0 to disable expiration.
# Note: The priority of node interfaces can be configured with the
#    "connInterfacesFile" parameter. 
# Default: 10000


#
# --- Section 3.3: [Storage] ---
#

# [storeMetaDirectory]
# The absolute path and name of a directory where the file system can store its
# metadata.
# Default: <none>

# [storeAllowFirstRunInit]
# Enables or disables daemon startup with an uninitialized storage directory.
# This can be used to make sure that the daemon does not run when the storage
# partition is not mounted (e.g. because it needs repair after a power outage).
# Note: This setting must be enabled during first startup of the daemon, but
#    may be disabled afterwards.
# Default: true

# [storeUseExtendedAttribs]
# Controles whether metadata is stored as normal file contents (=false) or as
# extended attributes (=true). Depending on the type and version of your 
# underlying local file system, extended attributes typically are significantly
# faster, but they are also more difficult to backup.
# Note: This setting can only be configured at first startup and cannot be
#    changed afterwards.
# Default: false


#
# --- Section 3.4: [Tuning] ---
#

# [tuneNumWorkers]
# The number of worker threads. Should be at least 3. A value of up to three
# times the number of CPU cores of your machine is the recommended choice.
# Note: 0 means use twice the number of CPU cores (but at least 4).
# Default: 0

# [tuneTargetChooser]
# The algorithm to choose storage targets for file creation.
# Values: "randomized" (choose targets in a randomized fashion), "roundrobin"
#	  (choose targets in a deterministic round-robin fashion).
# Note: The round-robin chooser does not honor client's preferred nodes 
#    settings and has some other minor disadvantages. It should currently not
#    be used for production workloads.
# Default: randomized


#
# --- Section 3.5: [System Settings] ---
#

# [sysMgmtdHost]
# Hostname (or IP) of the host running the management service.
# (See also "connMgmtdPortUDP" and "connMgmtdPortTCP")
# Default: <none>


#
# --- Section 3.6: [Startup] ---
#

# [runDaemonized]
# Detach the process from its parent (and from stdin/-out/-err).
# Default: true
